package game.controller
{
	import game.constants.ApplicationNotification;
	import game.model.time.TimeProxy;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	/**
	 * ...
	 * @author Thot
	 */
	
	public class TimerCommand extends SimpleCommand
	{
		override public function execute( notification:INotification ):void
		{
			var proxy:TimeProxy = facade.retrieveProxy(TimeProxy.NAME) as TimeProxy;
			
			switch( notification.getName() )
			{
				case ApplicationNotification.START_TIMER: proxy.start(); break;
				case ApplicationNotification.STOP_TIMER: proxy.stop(); break;
				case ApplicationNotification.RESET_TIMER: proxy.reset(); break;
			}
		}
	}

}